import { createRouter, createWebHistory } from 'vue-router'


const routes = [
  {
    path: '/',
    name: 'index',
    component: () => import("@/views/index.vue"),
    redirect:'/main',
    children: [
      {
        path: '/main',
        name: 'main',
        component: () => import("@/views/main/index.vue"),
      },
      {
        path: '/explore',
        name: 'explore',
        component: () => import("@/views/explore/index.vue"),
      },
      {
        path: '/map',
        name: 'map',
        component: () => import("@/views/map/index.vue"),
      },
      {
        path: '/mapLeft',
        name: 'mapLeft',
        component: () => import("@/views/mapLeft/index.vue"),
      }
    ]
  },
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes
})

export default router
